Move some items in airflow.utils.context to appropriate places#53600
Merged
ephraimbuddy merged 9 commits intoapache:mainfrom Aug 11, 2025
Merged
Move some items in airflow.utils.context to appropriate places#53600ephraimbuddy merged 9 commits intoapache:mainfrom
airflow.utils.context to appropriate places#53600ephraimbuddy merged 9 commits intoapache:mainfrom
Conversation
util.context to appropriate placesairflow.utils.context to appropriate places
amoghrajesh
reviewed
Jul 29, 2025
Contributor
amoghrajesh
left a comment
There was a problem hiding this comment.
Looking good generally, having context from "airflow.sdk" in s10 and models doesn't look too right to me. But I do not have a counter proposal as of yet.
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
f930d81 to
c7b6208
Compare
Contributor
Author
|
Note that the context_merge function and context_copy_partial are no longer imported from airflow.utils.context to core but still exist in the module. When we move other items in the module, we can then remove them and add a backcompat for their import by users |
amoghrajesh
reviewed
Jul 30, 2025
Contributor
amoghrajesh
left a comment
There was a problem hiding this comment.
Looking better, last set of comments.
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/decorators/kubernetes_cmd.py
Outdated
Show resolved
Hide resolved
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
23e7948 to
b555440
Compare
amoghrajesh
approved these changes
Aug 4, 2025
Contributor
amoghrajesh
left a comment
There was a problem hiding this comment.
One comment, and one suggestion.
Looks good otherwise.
providers/standard/src/airflow/providers/standard/operators/python.py
Outdated
Show resolved
Hide resolved
context_manager was only used once in airflow-core, so I redefined it where it was used. Likewise context_copy_partial. Then Context was added to the depreccation for easy import
b555440 to
9450aac
Compare
9450aac to
65faa2a
Compare
18 tasks
RoyLee1224
pushed a commit
to RoyLee1224/airflow
that referenced
this pull request
Aug 15, 2025
…che#53600) * Move some items in `util.context` to appropriate places context_manager was only used once in airflow-core, so I redefined it where it was used. Likewise context_copy_partial. Then Context was added to the depreccation for easy import * Only remove core dependency in sdk * fixup! Only remove core dependency in sdk * Use class obj instead of self * fixup! Use class obj instead of self * fixup! fixup! Use class obj instead of self * fixup! fixup! fixup! Use class obj instead of self * fixup! fixup! fixup! fixup! Use class obj instead of self * fixup! fixup! fixup! fixup! fixup! Use class obj instead of self
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
context_manager was only used once in airflow-core, so I redefined it where it was used. Likewise context_copy_partial. Then Context was added to the depreccation for easy import
closes: #53601